function [x_smooth,y_smooth] = smooth_values(x,y)
	N=10;
	x_smooth = linspace(min(x), max(x), N);
	y_sums = zeros(size(x_smooth));
	counts = zeros(size(x_smooth));
	for i=1:length(x)
		[min_dist, min_ind] = min(abs(x(i) - x_smooth));
		y_sums(min_ind) = y_sums(min_ind) + y(i);
		counts(min_ind) = counts(min_ind) + 1;
	end
	y_smooth = y_sums ./ counts;
end
